﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FisheryPlatform.Entity;
using FisheryPlatform.DataAccess.Account;

namespace FisheryPlatform.Bussiness.Account
{
    public class UserManager
    {
        public static UsersEntity GetUserInfo(long userId)
        {
            return UsersDB.GetByUserId(userId);
        }

        public static List<UsersEntity> Search(string sqlWhere, int pageIndex, int pageSize, out int pageCount)
        {
            return UsersDB.Search(sqlWhere, pageIndex, pageSize, out pageCount);
        }

        public static bool Save(UsersEntity user)
        {
            return UsersDB.Save(user);
        }

        public static UsersEntity GetUserInfo(string loginName, string password)
        {
            return UsersDB.GetUserInfo(loginName, password);
        }

        public static bool UpdatePassword(long userId, string password)
        {
            return UsersDB.UpdatePassword(userId, password);
        }

        public static List<UsersEntity> GetListByUserIds(string userIds)
        {
            return UsersDB.GetListByUserIds(userIds);
        }
    }
}
